package com.wetest.uia2.stub.watcher;

import androidx.test.uiautomator.UiDevice;
import androidx.test.uiautomator.UiObjectNotFoundException;
import androidx.test.uiautomator.UiSelector;
import com.wetest.uia2.stub.Log;

/* loaded from: classes5.dex */
public class ClickUiObjectWatcher extends SelectorWatcher {
    private UiSelector target;

    public ClickUiObjectWatcher(UiSelector[] conditions, UiSelector target) {
        super(conditions);
        this.target = null;
        this.target = target;
    }

    @Override // com.wetest.uia2.stub.watcher.SelectorWatcher
    public void action() {
        Log.d("ClickUiObjectWatcher triggered!");
        if (this.target != null) {
            try {
                UiDevice.getInstance(null).findObject(this.target).click();
            } catch (UiObjectNotFoundException e) {
                Log.d(e.getMessage());
            }
        }
    }
}